#include <stdio.h>

int Calc_B(int num)
{
	int a = 1;
	int i = 32;
	int count = 0;
	
	while(i)
	{
		count += num & 1;
		num >>= 1;
		i--;
	}
	return count;
}

int main()
{
	
	int num = 15;
	scanf("%d", &num);
	int count = Calc_B(num);
	
	printf("%d ", count);
	
	return 0;
}


